import request from "@/utils/request";

//钱包信息
export function storeWallet(data) {
  return request({
    url: "/store/wallet",
    method: "post",
    data: data,
  });
}
//商家积分钱包信息
export function storePointsInfo(query) {
  return request({
    url: "/store/wallet/points/info",
    method: "get",
    params: query,
  });
}
// 查询收支列表
export function walletWalletFlow(query) {
  return request({
    url: "/store/walletFlow",
    method: "get",
    params: query,
  });
}

//银行卡列表
export function bankList(query) {
  return request({
    url: "/store/bank/list",
    method: "get",
    params: query,
  });
}
//添加银行卡
export function bankSave(data) {
  return request({
    url: "/store/bank/save",
    method: "post",
    data: data,
  });
}
//银行卡详情
export function bankDetail(id) {
  return request({
    url: `/store/bank/detail/${id}`,
    method: "get",
  });
}
//设置默认银行卡
export function bankDefault(id) {
  return request({
    url: `/store/bank/default/${id}`,
    method: "get",
  });
}
//删除银行卡
export function bankDelete(id) {
  return request({
    url: `/store/bank/delete/${id}`,
    method: "get",
  });
}
// 获取省市区id
export function addressPid(query) {
  return request({
    url: "/baseData/cities",
    method: "get",
    params: query,
  });
}
//添加提现
export function withdrawalAdd(data) {
  return request({
    url: "/store/withdrawal/add",
    method: "post",
    data: data,
  });
}
//提现列表
export function withdrawalPage(query) {
  return request({
    url: "/store/withdrawal/list",
    method: "get",
    params: query,
  });
}